package com.ghost.manager
{
	import com.ghost.view.pop.Pop_base;
	import com.ghost.view.pop.Pop_main;
	
	import flash.display.DisplayObject;

	/**
	 * @author ghost
	 * 管理所有弹出窗口
	 */	
	public class Pop_win_manager
	{
		private static var instance:Pop_win_manager;
		public static function getInstance():Pop_win_manager
		{
			if(instance == null)
			{
				instance = new Pop_win_manager();
			}
			return instance;
		}
		public function Pop_win_manager()
		{
		}
		public var pop_main:Pop_main;
		/**
		 * @param pop_win_obj
		 * 创建pop
		 */		
		public function Creat_pop_win(pop_win_obj:DisplayObject,count_width_bool:Boolean=true):void
		{
			//调用pop_main里的打开pop界面
			pop_main.Creat_pop_win(pop_win_obj,count_width_bool);
		}
		/**
		 * @param pop_win_obj
		 * 移除pop
		 */	
		public function Remove_pop_win(pop_win_obj:DisplayObject,count_width_bool:Boolean=true):void
		{
			//调用pop_main里的移除pop界面
			pop_main.Remove_pop_win(pop_win_obj,count_width_bool);
		}
		/**
		 * 调整所有pop位置
		 */		
		public function reflash():void
		{
			pop_main.reflash_x_y();
		}
	}
}